<template>
  <view class="container">
    <view class="fs-40 fw-500">{{ navInfo.title || "" }}</view>
    <view class="flex-between-center c-677585 fs-28 mt-16 mb-40">
      <!-- <text>{{ $u.timeFormat(navInfo.createtime || '', 'yyyy.mm.dd hh:MM:ss') }}</text> -->
      <text></text>
      <text>浏览：{{ navInfo.see_num || 1 }}次</text>
    </view>
    <view class="mb-20" v-if="navInfo.video_url">
      <video
        :src="navInfo.video_url"
        class="video-player"
        :controls="true"
        :autoplay="true"
        :show-center-play-btn="false"
        :enable-progress-gesture="true"
        :show-fullscreen-btn="true"
        :initial-time="0"
      ></video>
    </view>
    <u-parse :content="navInfo.content || ''"></u-parse>
  </view>
</template>
<script>
import { navDetailApi } from "@/services/home";
export default {
  data() {
    return {
      navInfo: {},
    };
  },
  onLoad(options) {
    this.getNavDetail(options.id);
  },
  methods: {
    getNavDetail(id) {
      navDetailApi({ id }).then((res) => {
        this.navInfo = res.data?.nav_info || {};
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.container {
  padding: 32rpx 40rpx;
  .video-player {
    width: 100%;
    height: 350rpx;
    border-radius: 12rpx; // 给视频播放器添加圆角
  }
}
</style>